package yxy.cherry.battle.module.anger;

/** 怒气 */
public class Anger {
	int angerUpper;// 怒气上限
	int angerPoint;// 怒气点数
	int angerTrigger;// 愤怒阈

	public Anger(int angerUpper, int angerPoint, int angerTrigger) {
		this.angerUpper = angerUpper;
		this.angerTrigger = angerTrigger;
		addPoint(angerPoint);
	}

	public int addPoint(int add) {
		angerPoint += add;
		if (angerPoint > angerUpper) {
			angerPoint = angerUpper;
		}
		return angerPoint;
	}

	public void resetPoint() {
		angerPoint = 0;
	}

	public int getAngerUpper() {
		return angerUpper;
	}

	public int getAngerPoint() {
		return angerPoint;
	}

	public int getAngerTrigger() {
		return angerTrigger;
	}

	public boolean isAnger() {
		return angerPoint >= angerTrigger;
	}
}
